home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000470_kb@cs.umb.edu_Wed Apr 6 10:35:36 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  3KB

  1. Received: from terminus.cs.umb.edu by cs.umb.edu with SMTP id AA04408
  2.   (5.65c/IDA-1.4.4 for <tex-k-exp@cs.umb.edu>); Wed, 6 Apr 1994 14:35:37 -0400
  3. Received: by terminus.cs.umb.edu id AA11176
  4.   (5.65c/IDA-1.4.4 for tex-k); Wed, 6 Apr 1994 14:35:36 -0400
  5. Date: Wed, 6 Apr 1994 14:35:36 -0400
  6. From: "K. Berry" <kb@cs.umb.edu>
  7. Message-Id: <199404061835.AA11176@terminus.cs.umb.edu>
  8. To: tex-k@cs.umb.edu
  9. Subject: converting a driver to use kpathsea
  10.  
  11. Neal asked me about converting a driver to use kpathsea.
  12. I hope he doesn't mind my posting this reply, for the benefit of all you
  13. hordes of others out there wanting to do that :-)
  14.  
  15.    I'm psyching myself up to convert my 'eps' driver to use kpathsea.
  16.  
  17. :-)
  18.  
  19.     1) read pre/postamble 
  20.     2) give me bitmaps for glyphs
  21.  
  22. kpathsea doesn't do either of these things :-(
  23. Its purpose in life is to give you back a filename (that is, a string)
  24. which you can then fopen.
  25.  
  26. Pretty minimal, huh, for all the hub-bub and bugs? And yet just doing
  27. this has been a sufficient challenge that I haven't gotten into
  28. libraries for the file reading yet.
  29.  
  30. (Well, I did write libraries to read PK/GF/TFM files -- they're in the
  31. fontutils distribution on prep. But they have nothing to do with kpathsea.)
  32.  
  33.    Where do you suggest I look for examples?  I have glanced at dvipsk,
  34.  
  35. All three simultaneously :-)
  36. Seriously, they all have their uses.
  37. dvips is probably the closest to your application (resident.c and
  38. search.c have most of the relevant stuff.)
  39.  
  40. xdvi's dataflow is somewhat easier (for me) to comprehend than
  41. dvips'. Relevant files here are dvi_init.c, font-open.c (which is all my
  42. code), and some initializations in xdvi.c. But xdvi the program is
  43. probably the worst-written of the three.
  44.  
  45. dvi2xx is annoying because it's just one file. But the kpathsea changes
  46. are actually smaller and simpler for it than either of the others. Look
  47. for `kpse_'.
  48.  
  49. But the real place to look is probably the .h files in kpathsea itself.
  50. I try hard to document all the external functions. Of course there's no
  51. grand overview :-(  The interfaces are still changing, as I continually
  52. discover stupid ideas I had ... and so anything lacking is almost
  53. certainly a result of my muddled thinking -- so please, I'm happy to
  54. receive suggestions about the source code (as well as the user features
  55. which no one has been shy to give :-).
  56.  
  57. tex-file.h and tex-glyph.h are the highest-level routines, and are
  58. probably the ones you want to start with (and use).
  59.  
  60. K
  61.